package com.laijiale.dto;

import com.laijiale.constant.RE;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * @author laijiale
 * @date 2025年01月09日 0:02
 */

@Schema(name ="用户修改DTO")
@Data
public class UserUpdateDTO implements Serializable, RE {
    @NotNull(message = "主键不能为空")
    @Schema(description = "主键")
    private Long id;
    @Schema(description = "用户昵称")
    @Pattern(regexp = NICKNAME_RE, message = NICKNAME_RE_MSG)
    private String nickname;
    @Schema(description = "电子邮箱")
    @Pattern(regexp = EMAIL_RE, message = EMAIL_RE_MSG)
    private String email;
    @Schema(description = "用户性别")
    @Range(min = 0, max = 2, message = "性别只能使用θ,1,2三个值")
    private Integer gender;
    @Schema(description = "用户年龄")
    @Range(min = 16, max = 60, message = "年龄必须在16-60之间")
    private Integer age;
    @Schema(description = "用户星座")
    @Pattern(regexp = ZODIAC_RE, message = ZODIAC_RE_MSG)
    private String zodiac;
    @Schema(description = "用户省份")
    @Pattern(regexp = PROVINCE_RE, message = PROVINCE_RE_MSG)
    private String province;
    @Pattern(regexp = INFO_RE, message = INFO_RE_MSG)
    @Schema(description = "用户描述")
    private String info;
    @Schema(description = "角色ID列表")
    private List<Long> roleIds;

}
